package com.cai.io.demo;

import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("demo.txt",true);
        String str = "fsdjklj方式水水水水水水水水";
        fos.write(str.getBytes(StandardCharsets.UTF_8));
        fos.close();
    }
}
